<cfsetting enablecfoutputonly="Yes">

<!--- 
  /**
   * @author  rens@joxx.nl
   * @version 1.0 - 2003/02/20
   * @version 1.1 - 2003/11/24
   *                Very small bug fixed regarding the 'chopping-off' of the
   *                webroot from the currently executed script.
   */
--->

<cfscript>
  /**
   * @author  rens@joxx.nl
   * @version 1.0 - 2003.11.13
   */
  function getFuseLocation()
  {
    // Chop off the webroot and index (if present at all)
    var sFuseLocation = request.udf.getFuseLocationDir();
        
    if( len( cgi.query_string ))
    {
      sFuseLocation = sFuseLocation & "/?" & cgi.query_string;
    }
    
    return( iif( not len( sFuseLocation ), de( "." ), evaluate( de( "sFuseLocation" ))));
  }
  
  /**
   * @author  rens@joxx.nl
   * @version 1.0 - 2003.11.13
   */
  function getFuseLocationDir()
  {
    // Chop off the webroot and index (if present at all)
    var sFuseLocation = cgi.script_name;
    if( len( request.site.s_WEBROOT ))
    {
      sFuseLocation = replace( cgi.script_name, request.site.s_WEBROOT, "", "one" );
    }
    sFuseLocation = replace( sFuseLocation, "index.cfm", "", "one" );
    sFuseLocation = request.udf.pathFormat( sFuseLocation );

    return( iif( not len( sFuseLocation ), de( "." ), evaluate( de( "sFuseLocation" ))));
  }
  
  /* Copy to the request scope where everybody can use them */
  request.udf.getFuseLocation     = getFuseLocation;
  request.udf.getFuseLocationDir  = getFuseLocationDir;
</cfscript>

<cfsetting enablecfoutputonly="No">